import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3

Item {
    id: item2
    width: 1024
    height: 768
    property alias taskModeModel: taskModeModel
    property alias modePage: modePage
    property alias buttonPage: buttonPage
    property alias progressBar: progressBar

    Rectangle {
        id: rectangle
        color: "#000000"
        anchors.fill: parent

        Rectangle {
            id: rectangle1
            x: 142
            width: 689
            height: 471
            color: "#000000"
            anchors.top: parent.top
            anchors.topMargin: 34
            anchors.horizontalCenterOffset: 1
            anchors.horizontalCenter: parent.horizontalCenter

            Image {
                id: image2
                z: 0
                anchors.fill: parent
                source: "images/topmiddle.png"
            }

            SwipeView {
                id: swipeView
                spacing: 4
                orientation: Qt.Vertical
                interactive: false
                anchors.topMargin: 0
                anchors.fill: parent
                ButtonPage {
                    id: buttonPage
                }
                ModePage {
                    id: modePage
                }
                SettingsPage {
                    id: settingsPage
                }
            }
        }

        Item {
            id: rectangle2
            x: 359
            y: 511
            width: 689
            height: 220
            anchors.horizontalCenterOffset: 1
            anchors.horizontalCenter: parent.horizontalCenter

            Image {
                id: image3
                height: 61
                anchors.bottom: parent.bottom
                anchors.bottomMargin: 0
                source: "images/bottommiddle.png"
            }

            Rectangle {
                id: rectangle5
                x: 0
                y: 0
                width: 689
                height: 164
                color: "#000000"
            }

            ListView {
                id: listView
                x: 8
                y: 8
                orientation: ListView.Horizontal
                highlightRangeMode: ListView.NoHighlightRange
                flickableDirection: Flickable.AutoFlickDirection
                anchors.bottom: rectangle5.bottom
                anchors.bottomMargin: 0
                anchors.top: parent.top
                anchors.topMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                delegate: Item {
                    width: 170
                    height: 164
                    Rectangle {
                        id: rectangle34
                        color: "#26363d"
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 8
                        anchors.top: parent.top
                        anchors.topMargin: 4
                        anchors.left: parent.left
                        anchors.leftMargin: 4
                        anchors.right: parent.right
                        anchors.rightMargin: 4
                        Image {
                            id: modeImage
                            height: 60
                            source: modeIcon
                            anchors.top: parent.top
                            anchors.topMargin: 8
                            anchors.left: parent.left
                            anchors.leftMargin: 52
                            anchors.right: parent.right
                            anchors.rightMargin: 52
                        }
                        Text {
                            id: modeText
                            text: modeName
                            font.pixelSize: 16
                            font.bold: true
                            color: "#ffffff"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            anchors.top: modeImage.bottom
                            anchors.topMargin: 2
                            anchors.left: parent.left
                            anchors.leftMargin: 0
                            anchors.right: parent.right
                            anchors.rightMargin: 0
                            font.family: "微软雅黑"
                        }
                        Text {
                            id: temperature
                            text: tempTxt + "°C"
                            font.pixelSize: 12
                            font.bold: true
                            color: "#ffffff"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            anchors.top: modeText.bottom
                            anchors.topMargin: 2
                            anchors.left: parent.left
                            anchors.leftMargin: 0
                            anchors.right: parent.right
                            anchors.rightMargin: 0
                            font.family: "微软雅黑"
                        }
                        Text {
                            id: dosage
                            text: dosageTxt + ""
                            font.family: "微软雅黑"
                            font.pixelSize: 12
                            font.bold: true
                            color: "#ffffff"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            anchors.top: temperature.bottom
                            anchors.topMargin: 2
                            anchors.left: parent.left
                            anchors.leftMargin: 0
                            anchors.right: parent.right
                            anchors.rightMargin: 0
                        }
                        Text {
                            id: time
                            text: timeTxt + qsTr("分钟")
                            font.family: "微软雅黑"
                            font.pixelSize: 12
                            font.bold: true
                            color: "#ffffff"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                            anchors.top: dosage.bottom
                            anchors.topMargin: 2
                            anchors.left: parent.left
                            anchors.leftMargin: 0
                            anchors.right: parent.right
                            anchors.rightMargin: 0
                        }
                    }
                }
                model: ListModel {
                    id: taskModeModel
                }
            }

            ProgressBar {
                id: progressBar
                x: 8
                y: 167
                height: 38
                bottomPadding: 0
                topPadding: 0
                indeterminate: false
                anchors.top: listView.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 8
                anchors.left: parent.left
                anchors.leftMargin: 8
                spacing: 0
                value: 0
            }
        }

        Rectangle {
            id: rectangle3
            x: 0
            y: 34
            width: 162
            height: 697
            color: "#26363d"

            Rectangle {
                id: rectangle6
                height: 40
                color: "#01232b"
                anchors.top: parent.top
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Text {
                    id: text1
                    height: 40
                    color: "#ffffff"
                    text: qsTr("大水箱")
                    font.family: "微软雅黑"
                    font.pixelSize: 20
                    font.bold: true
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                    anchors.fill: parent
                }
            }

            Item {
                id: item1
                x: 0
                height: 384
                anchors.top: rectangle6.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Rectangle {
                    id: rectangle12
                    height: 44
                    color: swmStatus.bWaterTankHigh ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text7
                        color: "#ffffff"
                        text: swmStatus.bWaterTankHigh ? qsTr(
                                                             "高位传感器：触发") : qsTr(
                                                             "高位传感器：未触发")
                        opacity: 1
                        font.bold: true
                        font.family: "微软雅黑"
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle13
                    width: 200
                    height: 44
                    color: swmStatus.bWaterTankLow ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: rectangle12.bottom
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    Text {
                        id: text8
                        color: "#ffffff"
                        text: swmStatus.bWaterTankLow ? qsTr("低位传感器：触发") : qsTr(
                                                            "低位传感器：未触发")
                        opacity: 1
                        font.bold: true
                        font.family: "微软雅黑"
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle14
                    height: 44
                    color: "#00a600"
                    radius: 10
                    anchors.top: rectangle13.bottom
                    anchors.topMargin: 4
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2

                    Text {
                        id: text9
                        width: 70
                        color: "#ffffff"
                        text: qsTr("温度：")
                        anchors.bottom: parent.bottom
                        anchors.left: parent.left
                        anchors.top: parent.top
                        font.bold: true
                        font.family: "微软雅黑"
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignRight
                        font.pixelSize: 14
                    }

                    Text {
                        id: text29
                        width: 30
                        color: "#ffffff"
                        text: swmStatus.bWaterTankTemp
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.top: parent.top
                        anchors.topMargin: 0
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 0
                        anchors.left: text9.right
                        anchors.leftMargin: 0
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }

                    Text {
                        id: text30
                        color: "#ffffff"
                        text: qsTr("°C")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignLeft
                        anchors.right: parent.right
                        anchors.rightMargin: 0
                        anchors.top: parent.top
                        anchors.topMargin: 0
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 0
                        anchors.left: text29.right
                        anchors.leftMargin: 0
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle15
                    height: 44
                    color: swmStatus.bHeaterA ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle14.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text10
                        color: "#ffffff"
                        text: swmStatus.bHeaterA ? qsTr("加热棒1：启动") : qsTr(
                                                       "加热棒1：未启动")
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.bold: true
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle16
                    height: 44
                    color: swmStatus.bHeaterB ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.top: rectangle15.bottom
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text11
                        color: "#ffffff"
                        text: swmStatus.bHeaterB ? qsTr("加热棒2：启动") : qsTr(
                                                       "加热棒2：未启动")
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.bold: true
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle17
                    height: 44
                    color: swmStatus.bWaterTankSwitch ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle16.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text12
                        color: "#ffffff"
                        text: swmStatus.bWaterTankSwitch ? qsTr("水泵开关：打开") : qsTr(
                                                               "水泵开关：关闭")
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.bold: true
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle18
                    height: 44
                    color: swmStatus.bInValve ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.top: rectangle17.bottom
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text13
                        color: "#ffffff"
                        text: swmStatus.bInValve ? qsTr("进水阀门：打开") : qsTr(
                                                       "进水阀门：关闭")
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.bold: true
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle19
                    height: 44
                    color: swmStatus.bOutValve ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle18.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text14
                        color: "#ffffff"
                        text: swmStatus.bOutValve ? qsTr("排水阀门：打开") : qsTr(
                                                        "排水阀门：关闭")
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.bold: true
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }
            }

            Rectangle {
                id: rectangle8
                height: 40
                color: "#01232b"
                anchors.top: item1.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Text {
                    id: text3
                    height: 40
                    color: "#ffffff"
                    text: qsTr("添加液A")
                    font.family: "微软雅黑"
                    font.bold: true
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                    anchors.fill: parent
                    font.pixelSize: 20
                }
            }

            Item {
                id: item3
                height: 96
                anchors.top: rectangle8.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Rectangle {
                    id: rectangle20
                    width: 200
                    height: 44
                    color: swmStatus.pumpA > 0 ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text15
                        width: 90
                        color: "#ffffff"
                        text: qsTr("挡位：")
                        anchors.bottom: parent.bottom
                        anchors.left: parent.left
                        anchors.top: parent.top
                        font.bold: true
                        renderType: Text.NativeRendering
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignRight
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }

                    Text {
                        id: text31
                        color: "#ffffff"
                        text: swmStatus.pumpA
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        anchors.right: parent.right
                        anchors.rightMargin: 0
                        anchors.left: text15.right
                        anchors.leftMargin: 0
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 0
                        anchors.top: parent.top
                        anchors.topMargin: 0
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle21
                    height: 44
                    color: swmStatus.annexA ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: rectangle20.bottom
                    anchors.topMargin: 4
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2

                    Text {
                        id: text16
                        color: "#ffffff"
                        text: swmStatus.annexA ? qsTr("添加液量：空") : qsTr(
                                                     "添加液量：正常")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }
            }

            Rectangle {
                id: rectangle9
                height: 40
                color: "#01232b"
                anchors.top: item3.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Text {
                    id: text4
                    color: "#ffffff"
                    text: qsTr("添加液B")
                    font.family: "微软雅黑"
                    font.bold: true
                    horizontalAlignment: Text.AlignHCenter
                    verticalAlignment: Text.AlignVCenter
                    anchors.fill: parent
                    font.pixelSize: 20
                }
            }

            Item {
                id: item4
                height: 96
                anchors.top: rectangle9.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Rectangle {
                    id: rectangle22
                    height: 44
                    color: swmStatus.pumpB > 0 ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text17
                        width: 90
                        height: 30
                        color: "#ffffff"
                        text: qsTr("挡位：")
                        anchors.bottom: parent.bottom
                        anchors.left: parent.left
                        anchors.top: parent.top
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignRight
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }

                    Text {
                        id: text32
                        color: "#ffffff"
                        text: swmStatus.pumpB
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        anchors.right: parent.right
                        anchors.rightMargin: 0
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 0
                        anchors.top: parent.top
                        anchors.topMargin: 0
                        anchors.left: text17.right
                        anchors.leftMargin: 0
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle23
                    height: 44
                    color: swmStatus.annexB ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: rectangle22.bottom
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text18
                        color: "#ffffff"
                        text: swmStatus.annexB ? qsTr("添加液量：空") : qsTr(
                                                     "添加液量：正常")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }
            }
        }

        Rectangle {
            id: rectangle4
            x: 863
            y: 34
            width: 161
            height: 697
            color: "#26363d"

            Rectangle {
                id: rectangle7
                height: 40
                color: "#01232b"
                anchors.top: parent.top
                anchors.topMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0

                Text {
                    id: text2
                    color: "#ffffff"
                    text: qsTr("小水箱")
                    font.bold: true
                    font.family: "微软雅黑"
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                    anchors.fill: parent
                    font.pixelSize: 20
                }
            }

            Item {
                id: item5
                height: 384
                anchors.top: rectangle7.bottom
                anchors.topMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0

                Rectangle {
                    id: rectangle24
                    height: 44
                    color: swmStatus.sWaterTankHigh ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text19
                        color: "#ffffff"
                        text: swmStatus.sWaterTankHigh ? qsTr(
                                                             "高位传感器：触发") : qsTr(
                                                             "高位传感器：未触发")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle25
                    height: 44
                    color: swmStatus.sWaterTankLow ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle24.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text20
                        color: "#ffffff"
                        text: swmStatus.sWaterTankLow ? qsTr("低位传感器：触发") : qsTr(
                                                            "低位传感器：未触发")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle26
                    width: 145
                    height: 44
                    color: "#00a600"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle25.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text21
                        width: 70
                        color: "#ffffff"
                        text: qsTr("温度：")
                        anchors.bottom: parent.bottom
                        anchors.left: parent.left
                        anchors.top: parent.top
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignRight
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }

                    Text {
                        id: text33
                        width: 30
                        color: "#ffffff"
                        text: swmStatus.sWaterTankTemp
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.top: parent.top
                        anchors.topMargin: 0
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 0
                        anchors.left: text21.right
                        anchors.leftMargin: 0
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }

                    Text {
                        id: text34
                        color: "#ffffff"
                        text: qsTr("°C")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        anchors.right: parent.right
                        anchors.rightMargin: 0
                        anchors.top: parent.top
                        anchors.topMargin: 0
                        anchors.bottom: parent.bottom
                        anchors.bottomMargin: 0
                        anchors.left: text33.right
                        anchors.leftMargin: 0
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle27
                    height: 44
                    color: swmStatus.sHeater ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle26.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text22
                        color: "#ffffff"
                        text: swmStatus.sHeater ? qsTr("加热棒：启动") : qsTr(
                                                      "加热棒：未启动")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle28
                    height: 44
                    color: swmStatus.sWaterTankSwitch ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle27.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text23
                        color: "#ffffff"
                        text: swmStatus.sWaterTankSwitch ? qsTr("水泵开关：打开") : qsTr(
                                                               "水泵开关：关闭")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle29
                    height: 44
                    color: swmStatus.sInValve ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.top: rectangle28.bottom
                    anchors.topMargin: 4

                    Text {
                        id: text24
                        color: "#ffffff"
                        text: swmStatus.sInValve ? qsTr("进水阀门：打开") : qsTr(
                                                       "进水阀门：关闭")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }
            }

            Rectangle {
                id: rectangle10
                height: 40
                color: "#01232b"
                anchors.top: item5.bottom
                anchors.topMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0

                Text {
                    id: text5
                    color: "#ffffff"
                    text: qsTr("门")
                    font.bold: true
                    font.family: "微软雅黑"
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                    anchors.fill: parent
                    font.pixelSize: 20
                }
            }

            Item {
                id: item6
                height: 96
                anchors.top: rectangle10.bottom
                anchors.topMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0

                Rectangle {
                    id: rectangle30
                    width: 139
                    height: 44
                    color: swmStatus.doorStatus ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.right: parent.right
                    anchors.rightMargin: 2
                    anchors.left: parent.left
                    anchors.leftMargin: 2

                    Text {
                        id: text27
                        color: "#ffffff"
                        text: swmStatus.doorStatus ? qsTr("门传感器：开门状态") : qsTr(
                                                         "门传感器：关门状态")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle31
                    width: 139
                    height: 44
                    color: swmStatus.doorSwitch ? "#ff0000" : "#00a600"
                    radius: 10
                    anchors.top: rectangle30.bottom
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text28
                        color: "#ffffff"
                        text: swmStatus.doorSwitch ? qsTr("门锁：打开") : qsTr(
                                                         "门锁：关闭")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }
            }

            Rectangle {
                id: rectangle11
                height: 40
                color: "#01232b"
                anchors.top: item6.bottom
                anchors.topMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0

                Text {
                    id: text6
                    color: "#ffffff"
                    text: qsTr("烘干")
                    font.bold: true
                    font.family: "微软雅黑"
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignHCenter
                    anchors.fill: parent
                    font.pixelSize: 20
                }
            }

            Item {
                id: item7
                width: 200
                height: 96
                anchors.top: rectangle11.bottom
                anchors.topMargin: 0
                anchors.right: parent.right
                anchors.rightMargin: 0
                anchors.left: parent.left
                anchors.leftMargin: 0

                Rectangle {
                    id: rectangle32
                    width: 153
                    height: 44
                    color: swmStatus.heaterA ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.top: parent.top
                    anchors.topMargin: 0
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text25
                        color: "#ffffff"
                        text: swmStatus.heaterA ? qsTr("加热棒1：启动") : qsTr(
                                                      "加热棒1：未启动")
                        font.bold: true
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.family: "微软雅黑"
                        font.pixelSize: 14
                    }
                }

                Rectangle {
                    id: rectangle33
                    width: 145
                    height: 44
                    color: swmStatus.heaterB ? "#00a600" : "#d3d3d3"
                    radius: 10
                    anchors.top: rectangle32.bottom
                    anchors.topMargin: 4
                    anchors.left: parent.left
                    anchors.leftMargin: 2
                    anchors.right: parent.right
                    anchors.rightMargin: 2

                    Text {
                        id: text26
                        color: "#ffffff"
                        text: swmStatus.heaterB ? qsTr("加热棒2：启动") : qsTr(
                                                      "加热棒2：未启动")
                        font.bold: true
                        font.family: "微软雅黑"
                        verticalAlignment: Text.AlignVCenter
                        horizontalAlignment: Text.AlignHCenter
                        anchors.fill: parent
                        font.pixelSize: 14
                    }
                }
            }
        }
    }

    Image {
        id: image
        x: 0
        y: 0
        width: 1024
        height: 34
        source: "images/top.png"
    }

    Image {
        id: image1
        x: 0
        y: 733
        width: 1024
        height: 35
        source: "images/bottom.png"
    }

    Connections {
        target: buttonPage
        onPageChanged: {
            swipeView.currentIndex = qmlPage
        }
    }

    Connections {
        target: settingsPage
        onPageChanged: {
            swipeView.currentIndex = qmlPage
        }
    }

    Connections {
        target: modePage
        onSelectModelID: {
            swipeView.currentIndex = 0
            //print("clicked")
        }
    }
}
